package com.lemurian.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;

import com.lemurian.entity.utils.DefaultPersistence;

@Entity
@Table(name="tb_signature_schedule")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@BatchSize(size=1000)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class SignatureSchedule extends DefaultPersistence implements Serializable {

	private static final long serialVersionUID = 1L;

	private Boolean signatureStatus;
	private String note;
	private String groups;
	private String agent;
	private String ssb;
	private String ssp;
	private String rpSsb;
	private String pic;
	private Date signatureDate;
	private String place;

	@ManyToOne
	@JoinColumn(name="client_id")
	private Client client;
	
	@ManyToOne
	@JoinColumn(name="department_id")
	private Category department;
	
	@Column(name="agent", length=45)
	public String getAgent() {
		return agent;
	}
	
	public void setAgent(String agent) {
		this.agent = agent;
	}

	@Column(length=1,name="signature_status", nullable=true)
	@Type(type="true_false")
	public Boolean getSignatureStatus() {
		return signatureStatus;
	}

	public void setSignatureStatus(Boolean signatureStatus) {
		this.signatureStatus = signatureStatus;
	}

	@Column(name="note", length=45)
	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	@Column(name="groups", length=45)
	public String getGroups() {
		return groups;
	}

	public void setGroups(String groups) {
		this.groups = groups;
	}

	@Column(name="ssb", length=45)
	public String getSsb() {
		return ssb;
	}

	public void setSsb(String ssb) {
		this.ssb = ssb;
	}

	@Column(name="ssp", length=45)
	public String getSsp() {
		return ssp;
	}

	public void setSsp(String ssp) {
		this.ssp = ssp;
	}

	@Column(name="ssb_rp", length=45)
	public String getRpSsb() {
		return rpSsb;
	}

	public void setRpSsb(String rpSsb) {
		this.rpSsb = rpSsb;
	}

	@Column(name="pic", length=45)
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@Temporal(TemporalType.DATE)
	@JoinColumn(name="signature_date")
	public Date getSignatureDate() {
		return signatureDate;
	}

	public void setSignatureDate(Date signatureDate) {
		this.signatureDate = signatureDate;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	@Column(name="place", length=45)
	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public Category getDepartment() {
		return department;
	}

	public void setDepartment(Category department) {
		this.department = department;
	}
	
}
